A controller delivers a flow entry to a network device, so that the network device can perform a corresponding function such as forwarding or discarding a packet according to the obtained flow entry. To enable a network device to perform a function, a controller needs to deliver one or more flow entries related to the function to the network device. The network device usually specifies dedicated storage space to specially store the flow entries delivered by the controller.
In the prior art, when a controller delivers a flow entry to a network device, the controller does not consider a storage status of storage space of the network device that is used to store a flow entry. When storage space of a network device that is used to store a flow entry is insufficient, a controller may still deliver a flow entry to the network device to enable the network device to perform a function. Because the network device has insufficient storage space in this case, the network device can store no flow entry or only a part of a received flow entry. As a result, the network device cannot perform the function, and the controller unsuccessfully delivers the flow entry.
How to improve a success rate of delivering a flow entry by a controller is a technical problem that needs to be resolved.